from django.test import TestCase
import pickle
import base64

# Create your tests here.

cookie_cart = {
    "sku_id": {
        "count": 1,
        "selected": True,
    }
}

p_d = pickle.dumps(cookie_cart)

print(p_d)
b_b_6 = base64.b64encode(p_d)
print(b_b_6)
b_d = b_b_6.decode()
print(b_d)
print('========================')
b_d_s = b_d.encode()
print(b_d_s)

b_d_s_d = base64.b64decode(b_d_s)
print(b_d_s_d)

print(pickle.loads(b_d_s_d))
print(type(pickle.loads(b_d_s_d)))

